<template>
	<view class="listsp">
		<view class="listitem" 
		     @click="jump(url,item)"
			v-for="(item,index) in list" :key='index'>
			<view class="top flex-row-between">
				<view class="color9">编号 :{{item.orderNo}}</view>
				<view class="tip font12">待使用</view>
			</view>
			<view class="info flex-row-start">
				<image src="https://www.haopengsong.xyz/static/food/icon1.png" mode="scaleToFill" class="bg" v-if='item.orderType == 1 || item.orderType == 2'></image>
				<image src="https://www.haopengsong.xyz/static/qipai.jpg" mode="scaleToFill" class="bg"  v-if='item.orderType == 3'></image>				
				<image src="https://www.haopengsong.xyz/static/wenquanorder.jpg" mode="scaleToFill" class="bg"  v-if='item.orderType == 4'></image>
				<image src="https://www.haopengsong.xyz//static/studysmall.jpg" mode="scaleToFill" class="bg"  v-if='item.orderType == 6'></image>
				<image src="@/static/moviesmallbg.jpg" mode="scaleToFill" class="bg"  v-if='item.orderType == 5'></image>
				<view class="content">
					<view class="font15">{{item.orderDesc}}</view>
					<view class="type font12">{{item.remark}}</view>
					<view class="type font12" v-if='item.appStartTime'>预约开始时段:{{item.appStartTime}}</view>
					<view class="type font12" v-if='item.appEndTime'>预约结束时段:{{item.appEndTime}}</view>
					<view class="type font12 color9">订单时间：{{item.createTime}}</view>
				</view>
			</view>
			<view class="money text-right">实付金额：￥<text class="font18">0<!-- {{item.payMount}} --></text></view>
		</view>
		<view class="nodata">
			<u-empty text="暂无数据" mode="list" v-if='list.length == 0'></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		props:['bg','title','url','list'],
		methods:{
			jump(url,res){
				uni.navigateTo({
					url: url+'?id='+res.id+'&type='+res.orderType
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.listitem{
		border-radius: 12px;
		overflow: hidden;
		margin-bottom: 10px;
		overflow: hidden;
		background-color: #fff;
		padding:15px 12px;
	}
	.top{
		padding-bottom: 10px;
		border-bottom: 1px solid #ECEFF4;
	}
	.tip{
		background-color: #FCEBD8;
		width: 52px;
		line-height: 24px;
		border-radius: 6px;
		color: #FF9100;
		text-align: center;
	}
	.info{
		margin-top: 10px;
		margin-bottom: 10px;
		.bg{
			width: 98px;
			height: 98px;
			border-radius: 3px;
			margin-right: 10px;
		}
		.type{
			padding-top:6px;
		}
	}
	.nodata{
		margin-top: 60px;
	}
</style>